FXO Device Interworking SIP E911 Calls from Service Provider's IP Network to PSAP DID Lines

The device's FXO interface can interwork SIP emergency E911 calls from the Service Provider's IP network to the analog PSAP DID lines. The standards that define this interface include TR-TSY-000350 or Bellcore’s GR-350-Jun2003. This protocol defines signaling between the E911 tandem switch (E911 Selective Router) and the PSAP, using analog loop-start lines. The FXO device can be implemented instead of an E911 switch, by connecting directly to the PSAP DID loop-start lines.

When an IP phone subscriber dials 911, the device receives the SIP INVITE message and makes a call to the PSAP as follows:

1. The FXO device seizes the line.
2. PSAP sends a Wink signal (250 msec) to the device.
3. Upon receipt of the Wink signal, the device dials MF digits after a user-defined time (WaitForDialTime) containing the caller's ID (ANI) obtained from the SIP headers From or P-Asserted-Identity.
4. When the PSAP operator answers the call, the PSAP sends a polarity reversal to the device, and the device then sends a SIP 200 OK to the IP side.
5. After the PSAP operator disconnects the call, the PSAP reverses the polarity of the line, causing the device to send a SIP BYE to the IP side.
6. If, during active call state, the device receives a Wink signal (typically of 500 msec) from the PSAP, the device generates a SIP INFO message that includes a "hookflash" body, or sends RFC 2833 hookflash Telephony event (according to the HookFlashOption parameter).
7. Following the "hookflash" Wink signal, the PSAP sends DTMF digits. These digits are detected by the device and forwarded to the IP, using RFC 2833 telephony events (or inband, depending on the device's configuration). Typically, this Wink signal followed by the DTMF digits initiates a call transfer.

For supporting the E911 service, used the following configuration parameter settings:

Enable911PSAP = 1 (also forces the EnableDIDWink and EnableReversalPolarity)
HookFlashOption = 1 (generates the SIP INFO hookflash message) or 4 for RFC 2833 telephony event
WinkTime = 700 (defines detection window of 50 to 750 msec for detection of both winks - 250 msec wink sent by the PSAP for starting the device's dialing; 500 msec wink during the call)
IsTwoStageDial = 0
EnableHold = 0
EnableTransfer = 0
Use RFC 2833 DTMF relay:
RxDTMFOption = 3
FirstTxDTMFOption = 4
RFC2833PayloadType = 101
TimeToSampleAnalogLineVoltage = 100
WaitForDialTime = 1000 (default is 1 sec)
SetDefaultLinePolarityState = 0 (you need to verify that the RJ-11 two-wire cable is connected without crossing, Tip to Tip, Ring to Ring. Typically, the Tip line is positive compared to the Ring line.)

If the two-wire cable is crossed, the SetDefaultLinePolarityState parameter must be set to 1.

The device expects to receive the ANI number in the From and/or P-Asserted-Identity SIP header. If the pseudo-ANI number exists, it should be sent as the display name in these headers.

Dialed Number by Device Depending on Calling Number

Digits of Calling Number (ANI)

Digits of Displayed Number

Number Dialed MF Digits

8
"nnnnnnnn"

-

MF dialed "KPnnnnnnnnST"

12
"nnnnnnnnnnnn"

None

"KPnnnnnnnnnnnnSTP"

12
"nnnnnnnnnnnn"

10
"mmmmmmmmmm" (pANI)

"KPnnnnnnnnnnnnSTKPmmmmmmmmmmST"

2
"nn"

None

"KPnnSTP"

1
"n"

-

MF dialed "KPnST"

For example:

Table notes:

For all other cases, a SIP 484 response is sent.
KP is for .
ST is for #.
STP is for B.

The MF duration of all digits, except for the KP digit is 60 msec. The MF duration of the KP digit is 120 msec. The gap duration is 60 msec between any two MF digits.

Manipulation rules can be configured for the calling (ANI) and called number (but not on the "display" string), for example, to strip 00 from the ANI "00INXXYYYY".
The called number, received as userpart of the Request URI ("301" in the example below), can be used to route incoming SIP calls to FXO specific ports, using the TrunkGroup and PSTNPrefix parameters.
When the PSAP party off-hooks and then immediately on-hooks (i.e., the device detects wink), the device releases the call sending SIP response "403 Forbidden" and the release reason 21 (i.e., call rejected) "Reason: Q.850 ;cause=21" is sent. Using the cause mapping parameter, it is possible to change the 403 to any other SIP reason, for example, to 603.
Sometimes a wink signal sent immediately after the FXO device seizes the line is not detected. To overcome this problem, configure the parameter TimeToSampleAnalogLineVoltage to 100 (instead of 1000 msec, which is the default value). The wink is then detected only after this timeout + 50 msec (minimum 150 msec).

Below are two examples for a) INVITE messages and b) INFO messages generated by hook-flash.

Example A: INVITE message with ANI = 333333444444 and pseudo-ANI = 0123456789:
INVITE sip:301@10.33.37.79;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.33.37.78;branch=z9hG4bKac771627168
Max-Forwards: 70
From: "0123456789" <sip:333333444444@example.com>;tag=1c771623824
To: <sip:301@10.33.37.79;user=phone>
Call-ID: 77162335841200014153@10.33.37.78
CSeq: 1 INVITE
Contact: <sip:101@10.33.37.78>
Supported: em,100rel,timer,replaces,path
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
User-Agent: AudioCodes-Sip-Gateway-FXO/7.40A.600.203
Privacy: none
P-Asserted-Identity: "0123456789" <sip:3333344444@example.com>
Content-Type: application/sdp
Content-Length: 253
v=0
o=AudioCodesGW 771609035 771608915 IN IP4 10.33.37.78
s=Phone-Call
c=IN IP4 10.33.37.78
t=0 0
m=audio 4000 RTP/AVP 8 0 101
a=rtpmap:8 pcma/8000
a=rtpmap:0 pcmu/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
Example B: The detection of a Wink signal generates the following SIP INFO message:
INFO sip:4505656002@192.168.13.40:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.13.2:5060
From: port1vega1 <sip:06@192.168.13.2:5060>
To: <sip:4505656002@192.168.13.40:5060>;tag=132878796-1040067870294
Call-ID: 0010-0016-D69A7DA8-1@192.168.13.2
CSeq:2 INFO
Content-Type: application/broadsoft
Content-Length: 17
event flashhook